package org.csmz.class2333;
class Student2{
    static String name;
    int age;
    public Student2(){
        System.out.println("施行构造方法");
    }
    {
        System.out.println("执行实例代码块");
        age = 18;
    }
    static {
        System.out.println("执行静态代码块");
        name = "张三";
    }
}
public class Example12 {
    public static void main(String[] args){
        Student2 s1 = new Student2();
        System.out.println("name=" + Student2.name+",age = "+ s1.age);
        Student2 s2 =new Student2();
        System.out.println("name=" + Student2.name+",age = "+ s2.age);
        Student2 s3 =new Student2();
        System.out.println("name=" + Student2.name+",age = "+ s3.age);

    }
}
